Text, or any other graphic structure, is often drawn into a bitmap or texture, and then copied from there into the drawing destination as needed. This caching mechanism is commonly used in many different applications for a variety of data objects, including icons, images and text characters, known as glyphs.
However, conventional caching techniques for such data objects are inefficient since objects are stored sequentially and without any consideration of individual object size. Such inefficient caching results in using more memory to store more bitmaps to hold all of the necessary drawing objects, as well as using more CPU resources and memory bandwidth to copy larger bitmaps around. For example, bitmaps used on the graphics processing unit (GPU) need to be uploaded to the GPU as textures. Therefore, the larger the textures are, the longer the upload will takes and the more system resources will subsequently be used to copy the bitmaps.
Additional drawback of conventional caching techniques is that fewer drawing objects stored per bitmap results in the cache filling up quickly, which often times necessitates frequent flushing of the cache to make room for other drawing objects that cannot fit. Such frequent cache flushing reduces the utility of the on-chip memory since the system is essentially drawing objects from scratch whenever they are needed, instead of being able to simply copy the cached version of the objects.
Further limitations and disadvantages of conventional and traditional approaches will become apparent to one of skill in the art, through comparison of such approaches with some aspects of the present method and apparatus set forth in the remainder of this disclosure with reference to the drawings.